﻿<?php
include "includeFiles.php";
include "page.php";
if(empty($cateid)) $cateid=11010;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="X-UA-Compatible" content="IE=7" />

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $C['Title'];?></title>
<Link href="../uploadfile/ico/<?php echo $C['ICO'];?>" rel="Shortcut Icon">
<meta name="Keywords" content="<?php echo $C['Keywords'];?>">
<meta name="description" content="<?php echo $C['Description'];?>">
<Meta name="Copyright" Content="<?php echo $C['CopyRight'];?>">

<link href="css/reset.css" rel="stylesheet" type="text/css" media="screen" />
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<?php include_once('header.php');?>

<?php include_once('ad.php');?>


<div class="main mid">
   <div class="main_left2">
      <ul>
         <li class="bt"><img src="images/productsbt.jpg" border="0" /></li>
		 
		   <?php	
	$vm=$info->getProMenu(1);
	foreach($vm as $key=>$value){
	 ?>
	
         <li class="bt2"><?=$value['CateName']?></li>
		    <?php	
	$vm2=$info->getProMenu($value['SysProCategoryID']);
	if($vm2){
	foreach($vm2 as $key=>$value2){
	 ?>
         <li><a href="products.php?cateid=<?=$value2['SysProCategoryID']?>&type=2"><?=$value2['CateName']?></a></li>
		  
		 
        <? } }}?>
      
      </ul>
   </div>
   <div class="main_right2">
      <div class="main_nav2"><a href="index.php">首页</a> > <a href="products.php">产品展厅</a> > 
	 <?=$alink=$info->getProLinks(getsubstr2($cateid,3))?>
	  >  <?=$alink=$info->getProLinks($cateid)?></div>
      <div class="main_bt2">Longines DolceVita</div>
         <div class="main_txt2">
            <ul class="products_list">
			
			<?php
if($keyword)
{
    $condition=" and ProductName like '%$keyword%' ";
}
else
{
    $condition=" and CateID='$cateid' ";
}

$SQL="SELECT * FROM `hy_b_sys_products`  where 1 $condition   and Lang='".$cfg_cur_lan."'   ";
$result=mysql_query($SQL);
$total=mysql_num_rows($result);
//调用pageft()，每页显示10条信息（使用默认的20时，可以省略此参数），使用本页URL（默认，所以省略掉）。
_PAGEFT($total,6);
if($total==0) echo "<h3>对不起！没有相关资料</h3>";
  $SQL2="SELECT * FROM `hy_b_sys_products`  where 1  $condition  and Lang='".$cfg_cur_lan."'   order by `SortNum` asc,`SysProductsID`  desc limit $firstcount,$displaypg  ";
$result=mysql_query($SQL2);
while($value=mysql_fetch_array($result)){
?>
               <li>
                  <div class="pic"><a href="product_detail.php?prid=<?=$value['SysProductsID']?>&cateid=<?=$value['CateID']?>&type=2"><img src="admin/pic.php?imagename=../uploadfile/product_b/<?=$value['Photos']?>&amp;imagewidth=268&amp;imageheight=295&amp;cuteit=0" border="0" /></a></div>
                  <div class="name"> <?=$value['ProductName']?><br />
 <?=$value['SubName']?> </div>
               </li>
            <? }?>
            </ul>
         </div>
      <div class="page"> <?php echo $pagenav; ?></div>
   </div>
</div>
<?php include_once('footer.php');?>
</body>
</html>
